package com.zhitong.money.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.UUID;

@Data
@AllArgsConstructor
public class Holiday {
    /**
     * id
     */
    private String id;
    /**
     * 假期名字
     */
    private String name;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date startTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date endTime;
    /**
     * 假期描述
     */
    private String description;

    /**
     * 00表示未开启
     * 01表示开启
     */
    private String status;

    /**
     *@Author: AndyZhang
     *@Description 随机获取32位id
     *@Date: 17:02 2021/1/20
     */
    public Holiday() {
        this.id=UUID.randomUUID().toString().replaceAll("-","");
    }
}
